import Paint from '../Paint';

export default class BaseView {

	/** 画板类 */
	private paint: Paint;

	/** 画板类 */
	public get Paint(): Paint {
		return this.paint;
	}

	/**
	 * 构造函数
	 * @param paint 画板类
	 */
	public constructor(el: HTMLCanvasElement) {
		this.paint = new Paint(el);
	}

	/** 清空界面 */
	public Clear(): void {
		this.Paint.Clear();
	}

	/** 运行 */
	public Run(): void {
		this.Paint.Run();
	}

	/** 停止运行 */
	public async Stop(): Promise<void> {
		await this.Paint.Stop();
	}
}
